package com.learning.jquizenglish.activity;

import android.graphics.Point;
import android.os.Build;
import android.os.Bundle;
import android.view.Display;

import com.learning.jquizenglish.screen.MainScreen;

public class MainActivity extends JQuizEnglishActivity {


	/** The screen width. */
	public static int SCREEN_WIDTH;
	
	/** The screen height. */
	public static int SCREEN_HEIGHT;
	
	private MainScreen mainScreen;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		initScreenSize();
		mainScreen = new MainScreen();
		switchContent(mainScreen, false);
	}
	
	public MainScreen getMainScreen(){
		return mainScreen;
	}
	
	/**
	 * Inits the screen size.
	 */
	protected void initScreenSize(){
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
			Display display = getWindowManager().getDefaultDisplay();
			Point size = new Point();
			display.getSize(size);
			SCREEN_WIDTH = size.x;
			SCREEN_HEIGHT = size.y;
		} else {
			Display display = getWindowManager().getDefaultDisplay();
			SCREEN_WIDTH = display.getWidth();
			SCREEN_HEIGHT = display.getHeight();
		}
	}


}
